import matplotlib.pyplot as plt
import numpy as np
import matplotlib.font_manager as fm

ypoints = np.array([1, 3, 4, 5, 8, 9, 6, 1, 3, 4, 5, 2, 4])

# 设置为支持中文的字体
# plt.rcParams['font.sans-serif'] = 'Songti SC'
plt.rcParams['font.sans-serif'] = 'Heiti TC'
plt.plot(ypoints)
# 轴标签和标题
plt.xlabel('日期')
plt.ylabel('数量')
plt.title('数据统计')
plt.show()
